﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Store_Keeper/Store_Keeper.master" AutoEventWireup="true" CodeFile="SM_GTN_Edit.aspx.cs" Inherits="Store_Manager_SM_GTN_Edit" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2.Export, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <style type="text/css">
        .style2
        {
            width: 100%;
        }


        .style3
        {
            width: 209px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <table class="style2">
        <tr>
            <td class="style3">
                &nbsp;</td>
            <td>
                <strong>Select GTN No:</strong></td>
            <td>
                <strong>
               
                
                <dx:ASPxComboBox ID="DropDownList1" runat="server" ClientIDMode="AutoID"  
                        DropDownStyle="DropDown" IncrementalFilteringMode="StartsWith"
                 DataSourceID="SqlDataSource1" 
                         
                    TextField="Issue_ID" TextFormatString="{0}"  ValueType="System.String"
                            ValueField="Issue_ID" 
                        CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                       
                        SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" 
                    Width="200px" AutoPostBack="True" EnableIncrementalFiltering="True" 
                        >
                        <LoadingPanelImage Url="~/App_Themes/BlackGlass/Editors/Loading.gif">
                        </LoadingPanelImage>
                        <ButtonStyle Width="11px">
                        </ButtonStyle>
                        <ValidationSettings ErrorText="Error has occurred">
                            <ErrorFrameStyle ImageSpacing="4px">
                                <ErrorTextPaddings PaddingLeft="4px" />
                            </ErrorFrameStyle>
                        </ValidationSettings>
                    </dx:ASPxComboBox>
                </strong>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="4">
                <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
                    ClientIDMode="AutoID" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
                    CssPostfix="BlackGlass" DataSourceID="SqlDataSource2" KeyFieldName="GRN_Key" 
                    Width="100%">
                    <Columns>
                        <dx:GridViewCommandColumn VisibleIndex="0">
                            <EditButton Visible="True">
                            </EditButton>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn FieldName="GRN_Key" ReadOnly="True" VisibleIndex="0">
                            <EditFormSettings Visible="False" />
<EditFormSettings Visible="False"></EditFormSettings>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Issue_ID" ReadOnly="True" Visible="False" 
                            VisibleIndex="1">
                            <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Item" FieldName="Pro_Name" ReadOnly="True" 
                            VisibleIndex="2">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Cost" FieldName="Pur_Price" ReadOnly="True" 
                            VisibleIndex="3">
                            <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Stock ID" FieldName="Sto_ID" 
                            ReadOnly="True" VisibleIndex="5">
                            <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Quantity" FieldName="Qty" VisibleIndex="6">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Status" FieldName="manger_status" 
                            ReadOnly="True" VisibleIndex="8">
                            <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Item ID" FieldName="Pro_ID" ReadOnly="True" 
                            VisibleIndex="12">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Item Code" FieldName="Code" ReadOnly="True" 
                            VisibleIndex="13">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Branch" ReadOnly="True" VisibleIndex="14">
                            <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <Images SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/BlackGlass/GridView/gvLoadingOnStatusBar.gif">
                        </LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/BlackGlass/GridView/Loading.gif">
                        </LoadingPanel>
                    </Images>
                    <ImagesFilterControl>
                        <LoadingPanel Url="~/App_Themes/BlackGlass/Editors/Loading.gif">
                        </LoadingPanel>
                    </ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
                        CssPostfix="BlackGlass">
                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                        </Header>
                    </Styles>
                    <StylesEditors>
                        <CalendarHeader Spacing="1px">
                        </CalendarHeader>
                        <ProgressBar Height="25px">
                        </ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                    DeleteCommand="DELETE FROM [Tbl_Iss_Request] WHERE [GRN_Key] = @GRN_Key" 
                    InsertCommand="INSERT INTO [Tbl_Iss_Request] ([Issue_ID], [Pro_Name], [Pur_Price], [Description], [Sto_ID], [Qty], [status], [manger_status], [User_Create], [Date_Create], [Last_Modify], [Key_Timestamp], [Pro_ID], [Code], [Branch]) VALUES (@Issue_ID, @Pro_Name, @Pur_Price, @Description, @Sto_ID, @Qty, @status, @manger_status, @User_Create, @Date_Create, @Last_Modify, @Key_Timestamp, @Pro_ID, @Code, @Branch)" 
                    SelectCommand="SELECT * FROM [Tbl_Iss_Request] WHERE ([Issue_ID] = @Issue_ID)" 
                    UpdateCommand="UPDATE [Tbl_Iss_Request] SET [Issue_ID] = @Issue_ID, [Pro_Name] = @Pro_Name, [Pur_Price] = @Pur_Price, [Description] = @Description, [Sto_ID] = @Sto_ID, [Qty] = @Qty, [status] = @status, [manger_status] = @manger_status, [User_Create] = @User_Create, [Date_Create] = @Date_Create, [Last_Modify] = @Last_Modify, [Pro_ID] = @Pro_ID, [Code] = @Code, [Branch] = @Branch WHERE [GRN_Key] = @GRN_Key">
                    <DeleteParameters>
                        <asp:Parameter Name="GRN_Key" Type="Int32" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="Issue_ID" Type="Int32" />
                        <asp:Parameter Name="Pro_Name" Type="String" />
                        <asp:Parameter Name="Pur_Price" Type="Decimal" />
                        <asp:Parameter Name="Description" Type="String" />
                        <asp:Parameter Name="Sto_ID" Type="String" />
                        <asp:Parameter Name="Qty" Type="Decimal" />
                        <asp:Parameter Name="status" Type="String" />
                        <asp:Parameter Name="manger_status" Type="String" />
                        <asp:Parameter Name="User_Create" Type="String" />
                        <asp:Parameter DbType="Date" Name="Date_Create" />
                        <asp:Parameter Name="Last_Modify" Type="DateTime" />
                      
                        <asp:Parameter Name="Pro_ID" Type="String" />
                        <asp:Parameter Name="Code" Type="Int32" />
                        <asp:Parameter Name="Branch" Type="String" />
                    </InsertParameters>
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList1" Name="Issue_ID" 
                            PropertyName="Value" Type="Int32" />
                    </SelectParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="Issue_ID" Type="Int32" />
                        <asp:Parameter Name="Pro_Name" Type="String" />
                        <asp:Parameter Name="Pur_Price" Type="Decimal" />
                        <asp:Parameter Name="Description" Type="String" />
                        <asp:Parameter Name="Sto_ID" Type="String" />
                        <asp:Parameter Name="Qty" Type="Decimal" />
                        <asp:Parameter Name="status" Type="String" />
                        <asp:Parameter Name="manger_status" Type="String" />
                        <asp:Parameter Name="User_Create" Type="String" />
                        <asp:Parameter DbType="Date" Name="Date_Create" />
                        <asp:Parameter Name="Last_Modify" Type="DateTime" />
                        
                        <asp:Parameter Name="Pro_ID" Type="String" />
                        <asp:Parameter Name="Code" Type="Int32" />
                        <asp:Parameter Name="Branch" Type="String" />
                        <asp:Parameter Name="GRN_Key" Type="Int32" />
                    </UpdateParameters>
                </asp:SqlDataSource>
                <strong>
               
                
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                    SelectCommand="SELECT DISTINCT [Issue_ID] FROM [Tbl_Iss_Request] WHERE ([manger_status] IS NULL)">
                </asp:SqlDataSource>
                </strong></td>
        </tr>
    </table>
</asp:Content>

